package com.cq.hd.task.web.job;

import com.cq.hd.product.api.TbActiveRedPacketBillApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class RedPacketTask {

    @Autowired
    private TbActiveRedPacketBillApi activeRedPacketBillApi;

    // 每隔1h扫描一次 0 0 */1 * * ?
    @XxlJob("scanRedPacketBill")
    public void execute() {
        log.info("扫描红包领取记录=====>开始");
        activeRedPacketBillApi.scanRedPacketBillJob();
        log.info("扫描红包领取记录=====>结束");
    }
}
